package com.eian.boot.module.system.associations.user.role.event;

import lombok.Getter;
import org.springframework.context.ApplicationEvent;

import java.util.List;

/**
 * 角色解绑事件
 * 当角色被删除导致其与所有用户的关系被清理时触发
 *
 * @author alex.meng
 * @since 1.0.0
 */
@Getter
public class RoleUnassignedEvent extends ApplicationEvent {

    private final Long roleId;
    private final List<Long> userIds;

    public RoleUnassignedEvent(Object source, Long roleId, List<Long> userIds) {
        super(source);
        this.roleId = roleId;
        this.userIds = userIds;
    }
}

